package com.bawei.exam57.room

import android.content.Context
import androidx.room.Room

object RoomUtils {
    lateinit var db: JfDataBase

    fun init(context: Context) {
        db = Room.databaseBuilder(context, JfDataBase::class.java, "jf.db")
            .allowMainThreadQueries()//允许在主线程查询
            .build()
    }
    fun getJFDb(): JfDataBase {
        return db
    }
}